<template>
  <view>
    <button type="primary" @click="btnClicked">{{count}}</button>
  </view>
</template>

<script>
  export default {
    data() {
      return {
        count:  this.initValue,
      };
    },
    props: {
      initValue: {
        type: [String, Number],
        default: 0
      }
    },
    methods: {
      btnClicked() {
        this.count++;
      }
    }
  }
</script>

<style lang="scss">

</style>
